home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group95b.txt / 000082_icon-group-sender _Tue Jul 11 06:52:34 1995.msg < prev    next >
Internet Message Format  |  1995-09-18  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Tue, 11 Jul 1995 08:48:33 MST
  2. Date: Tue, 11 Jul 1995 06:52:34 -0500 (CDT)
  3. From: "Chris D. Tenaglia" <cdt@post.its.mcw.edu>
  4. To: gep2@computek.net
  5. Cc: icon-group@cs.arizona.edu
  6. Subject: Re: DOS delay routine
  7. In-Reply-To: <9507101724.AA28967@ns1.computek.net>
  8. Message-Id: <Pine.ULT.3.90.950711064810.9684A-100000@post.its.mcw.edu>
  9. Mime-Version: 1.0
  10. Content-Type: TEXT/PLAIN; charset=US-ASCII
  11. Errors-To: icon-group-errors@cs.arizona.edu
  12.  
  13. That's a good suggestion. Thanks.
  14. I must have been thinking something
  15. along the line of benchmarks to keep it busy calculating, rather
  16. spinning on the clock. Actually I'd like it to "sleep"
  17. during the delay() rather than making the machine busy.
  18.  
  19. Chris Tenaglia   (system manager)     |  cdt@post.its.mcw.edu
  20. Medical College of Wisconsin          |
  21. 8701 W. Watertown Plank Rd.           |  Ce que vous voyez est
  22. Milwaukee, WI 53226   (414)456-8765   |  ce que vous obtenez !
  23.  
  24. On Mon, 10 Jul 1995 gep2@computek.net wrote:
  25.  
  26. > Date: Mon, 10 Jul 95 17:24 CDT
  27. > From: gep2@computek.net
  28. > To: icon-group@cs.arizona.edu
  29. > Subject: DOS delay routine
  30. > >...I needed something to wait about 5 min. between checkups do I wrote
  31. > a little delay route that waits in a little key sensing loop.
  32. > # provide a time delay to limited amount of collected data
  33. > #
  34. > procedure delay(n)
  35. >   target := n * 250000         # approx 5 min intervals
  36. >   every i:= 1 to target do
  37. >     {
  38. >     if kbhit() then
  39. >       {
  40. >       kee := getch()
  41. >       if kee == "\e" then halt("ESCAPED!")
  42. >       }
  43. >     22.0000/7.0000000
  44. >     }
  45. >   end
  46. > I'm curious why you didn't use &time or &clock to do this kind of thing, rather 
  47. > than just counting loop iterations or the like... if for no other reason than 
  48. > making your routine processor-speed-insensitive!
  49. > Gordon Peterson
  50. > http://www.computek.net/public/gep2/
  51.